<template>
  <div>
    <!-- 标题 -->
    <div>
      <h2>{{ homeneirong.title }}</h2>
    </div>
    <!-- 内容 -->
    <div class="nneirong">
      <span>{{ homeneirong.titleContent }}</span>
    </div>
    <!-- 图片 -->
    <div v-for="item in homeneirong.imgs" :key="item.id" class="tupian">
      <img :src="item.img" alt="" />
    </div>
  </div>
</template>

<script>
export default {
  name: "HomeContent",
  props: ["homeneirong"],
  mounted() {
    console.log(this.homeneirong);
    this.$nextTick(function () {
      if (!this.homeneirong) {
        this.$router.go(-1);
      }
    });
  },
};
</script>

<style scoped>
.tupian {
  width: 100%;
  /* height: 200px; */
}
.tupian > img {
  width: 100%;
}
.nneirong{
  margin: 5px 10px;
}
</style>